package tp.Composition.model;


public class Dog implements Animal
{

    private int barkFrequency;
    private Mammal mammal;

    public Dog(int barkFrequency, Mammal mammal)
    {
        this.barkFrequency = barkFrequency;
        this.mammal = mammal;
    }

    public int getBarkFrequency()
    {
        return barkFrequency;
    }

    public void setBarkFrequency(int barkFrequency)
    {
        this.barkFrequency = barkFrequency;
    }
    
    public Mammal getMammal()
    {
        return mammal;
    }

    public void setMammal(Mammal mammal)
    {
        this.mammal = mammal;
    }

    @Override
    public void action()
    {
        for (int i = 0; i < getBarkFrequency(); i++)
        {
            System.out.println("Dog Barking");
        }
    }
}
